function parseLineNumberAndText(line) {
    const match = line.match(/^\s*(\d+) \| (.*)$/);
    if (!match) {
        throw new Error('Invalid format: ' + line);
    }

    const number = parseInt(match[1]);
    const text = match[2].trim();

    return { number, text };
}


module.exports = {parseLineNumberAndText}